2024-09-13 15:51:42,898 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 15:54:39,537 INFO: 用户 user07 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:51]
2024-09-13 15:54:39,538 INFO: 用户 user07 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:54]
2024-09-13 15:54:39,552 INFO: 用户 user07 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:104]
2024-09-13 15:54:44,666 INFO: 用户 user07 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:48]
2024-09-13 15:54:44,834 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 15:57:49,063 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 15:57:49,150 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 15:57:53,672 INFO: 用户 user07 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:56]
2024-09-13 15:57:53,672 INFO: 用户 user07 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:59]
2024-09-13 15:57:53,688 INFO: 用户 user07 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:104]
2024-09-13 15:58:09,036 INFO: 用户 user01 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:48]
2024-09-13 15:58:09,469 INFO: 用户 user01 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 15:58:42,516 INFO: 用户 user01 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:56]
2024-09-13 15:58:42,516 INFO: 用户 user01 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:59]
2024-09-13 15:58:42,539 INFO: 用户 user01 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:104]
2024-09-13 15:58:46,809 INFO: 用户 user07 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:48]
2024-09-13 15:58:47,011 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:02:36,588 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:02:36,915 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:02:41,034 INFO: 用户 user07 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:56]
2024-09-13 16:02:41,034 INFO: 用户 user07 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:59]
2024-09-13 16:02:41,067 INFO: 用户 user07 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:92]
2024-09-13 16:02:54,534 INFO: IP 127.0.0.1 对应的城市: Undefined [in E:\AWork Folder-Course Resources\py\exchange_site\app\utils.py:10]
2024-09-13 16:02:54,550 INFO: 用户 user07 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:36]
2024-09-13 16:02:55,203 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:07:35,459 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:07:35,638 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:07:38,712 INFO: 用户 user07 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:56]
2024-09-13 16:07:38,713 INFO: 用户 user07 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:59]
2024-09-13 16:07:38,736 INFO: 用户 user07 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:94]
2024-09-13 16:07:42,876 ERROR: Exception on /login [POST] [in E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py:838]
Traceback (most recent call last):
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py", line 32, in login
    if ip == '127.0.0.1':
       ^^
UnboundLocalError: cannot access local variable 'ip' where it is not associated with a value
2024-09-13 16:08:33,893 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:08:40,712 ERROR: Exception on /login [POST] [in E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py:838]
Traceback (most recent call last):
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py", line 32, in login
    if ip == '127.0.0.1':
       ^^
UnboundLocalError: cannot access local variable 'ip' where it is not associated with a value
2024-09-13 16:12:23,179 ERROR: Exception on /login [POST] [in E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py:838]
Traceback (most recent call last):
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\.venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py", line 32, in login
    #     city = get_city_from_ip(ip)
         ^^
UnboundLocalError: cannot access local variable 'ip' where it is not associated with a value
2024-09-13 16:12:31,691 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:12:37,565 INFO: 登录尝试 - 用户名: user07, IP: 8.8.8.8 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:45]
2024-09-13 16:12:38,059 INFO: IP 8.8.8.8 对应的城市: Mountain View [in E:\AWork Folder-Course Resources\py\exchange_site\app\utils.py:25]
2024-09-13 16:12:38,245 INFO: 用户 user07 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:57]
2024-09-13 16:12:38,396 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:12:50,366 INFO: 用户 user07 离开聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:56]
2024-09-13 16:12:50,368 INFO: 用户 user07 断开连接 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:59]
2024-09-13 16:12:50,398 INFO: 用户 user07 退出登录 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:114]
2024-09-13 16:37:40,224 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:37:55,399 INFO: 登录尝试 - 用户名: user07, IP: 127.0.0.1, 主机: 127.0.0.1:5000, 经度: 106.55266583754697, 纬度: 29.742932787491114, 位置: 重庆市 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:38]
2024-09-13 16:37:55,559 INFO: 用户 user07 登录成功 [in E:\AWork Folder-Course Resources\py\exchange_site\app\routes.py:50]
2024-09-13 16:37:55,695 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
2024-09-13 16:42:12,174 INFO: 应用启动 [in E:\AWork Folder-Course Resources\py\exchange_site\app\__init__.py:34]
2024-09-13 16:42:12,416 INFO: 用户 user07 连接到聊天室 [in E:\AWork Folder-Course Resources\py\exchange_site\app\sockets.py:23]
